using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class BilTransferBillDetail : BusinessBase<string>
    {
        #region Declarations

        private string _tsfBillCode = String.Empty;
        private string _stockCode = String.Empty;
        private string _goodsCode = String.Empty;
        private string _goodsBarCode = String.Empty;
        private string _singleGoodsCode = String.Empty;
        private string _iBCode = String.Empty;
        private string _goodsName = String.Empty;
        private string _sourceAreaCode = String.Empty;
        private string _sourceAreaName = String.Empty;
        private string _sourceShelfCode = String.Empty;
        private string _sourceShelfName = String.Empty;
        private string _sourceLocationCode = String.Empty;
        private string _sourceLocationName = String.Empty;
        private string _sourceUnit = String.Empty;
        private int _planPkgGoodsQty = default(Int32);
        private int _planPieceGoodsQty = default(Int32);
        private string _targetAreaCode = String.Empty;
        private string _targetAreaName = String.Empty;
        private string _targetShelfCode = String.Empty;
        private string _targetShelfName = String.Empty;
        private string _targetLocationCode = String.Empty;
        private string _targetLocationName = String.Empty;
        private string _targetUnit = String.Empty;
        private int _pkgGoodsQty = default(Int32);
        private int _pieceGoodsQty = default(Int32);
        private string _remark = String.Empty;
        private string _EditFlag = String.Empty;


        #endregion

        #region Constructors

        public BilTransferBillDetail() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_tsfBillCode);
            sb.Append(_stockCode);
            sb.Append(_goodsCode);
            sb.Append(_iBCode);
            sb.Append(_goodsName);
            sb.Append(_sourceAreaCode);
            sb.Append(_sourceAreaName);
            sb.Append(_sourceShelfCode);
            sb.Append(_sourceShelfName);
            sb.Append(_sourceLocationCode);
            sb.Append(_sourceLocationName);
            sb.Append(_sourceUnit);
            sb.Append(_planPkgGoodsQty);
            sb.Append(_planPieceGoodsQty);
            sb.Append(_targetAreaCode);
            sb.Append(_targetAreaName);
            sb.Append(_targetAreaCode);
            sb.Append(_targetAreaName);
            sb.Append(_targetLocationCode);
            sb.Append(_targetLocationName);
            sb.Append(_targetUnit);
            sb.Append(_pkgGoodsQty);
            sb.Append(_pkgGoodsQty);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        //[DataMember]
        //public override string Id
        //{
        //    get
        //    {
        //        System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
        //        uniqueId.Append(_tsfBillCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_stockCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_goodsCode.ToString());
        //        return uniqueId.ToString();
        //    }
        //}

        [DataMember]
        public virtual string TsfBillCode
        {
            get { return _tsfBillCode.TrimEnd(); }
            set
            {
                OnTsfBillCodeChanging();
                _tsfBillCode = value;
                OnTsfBillCodeChanged();
            }
        }
        partial void OnTsfBillCodeChanging();
        partial void OnTsfBillCodeChanged();

        [DataMember]
        public virtual string StockCode
        {
            get { return _stockCode.TrimEnd(); }
            set
            {
                OnStockCodeChanging();
                _stockCode = value;
                OnStockCodeChanged();
            }
        }
        partial void OnStockCodeChanging();
        partial void OnStockCodeChanged();

        [DataMember]
        public virtual string GoodsCode
        {
            get { return _goodsCode.TrimEnd(); }
            set
            {
                OnGoodsCodeChanging();
                _goodsCode = value;
                OnGoodsCodeChanged();
            }
        }
        partial void OnGoodsCodeChanging();
        partial void OnGoodsCodeChanged();

        [DataMember]
        public virtual string GoodsBarCode
        {
            get { return _goodsBarCode.TrimEnd(); }
            set
            {
                _goodsBarCode = value;
            }
        }

        [DataMember]
        public virtual string SingleGoodsCode
        {
            get { return _singleGoodsCode.TrimEnd(); }
            set
            {
                _singleGoodsCode = value;
            }
        }

   
        [DataMember]
        public virtual string IBCode
        {
            get { return _iBCode.TrimEnd(); }
            set
            {
                OnIBCodeChanging();
                _iBCode = value;
                OnIBCodeChanged();
            }
        }
        partial void OnIBCodeChanging();
        partial void OnIBCodeChanged();

        [DataMember]
        public virtual string GoodsName
        {
            get { return _goodsName.TrimEnd(); }
            set
            {
                OnGoodsNameChanging();
                _goodsName = value;
                OnGoodsNameChanged();
            }
        }
        partial void OnGoodsNameChanging();
        partial void OnGoodsNameChanged();

        [DataMember]
        public virtual string SourceAreaCode
        {
            get { return _sourceAreaCode.TrimEnd(); }
            set
            {
                OnSourceAreaCodeChanging();
                _sourceAreaCode = value;
                OnSourceAreaCodeChanged();
            }
        }
        partial void OnSourceAreaCodeChanging();
        partial void OnSourceAreaCodeChanged();

        [DataMember]
        public virtual string SourceAreaName
        {
            get { return _sourceAreaName.TrimEnd(); }
            set
            {
                OnSourceAreaNameChanging();
                _sourceAreaName = value;
                OnSourceAreaNameChanged();
            }
        }
        partial void OnSourceAreaNameChanging();
        partial void OnSourceAreaNameChanged();

        [DataMember]
        public virtual string SourceShelfCode
        {
            get {return _sourceShelfCode.TrimEnd();}
            set {_sourceShelfCode = value;}
        }

        [DataMember]
        public virtual string SourceShelfName
        {
            get { return _sourceShelfName.TrimEnd();}
            set { _sourceShelfName = value; }
        }

        [DataMember]
        public virtual string SourceLocationCode
        {
            get { return _sourceLocationCode.TrimEnd(); }
            set
            {
                OnSourceLocationCodeChanging();
                _sourceLocationCode = value;
                OnSourceLocationCodeChanged();
            }
        }
        partial void OnSourceLocationCodeChanging();
        partial void OnSourceLocationCodeChanged();

        [DataMember]
        public virtual string SourceLocationName
        {
            get { return _sourceLocationName.TrimEnd(); }
            set
            {
                OnSourceLocationNameChanging();
                _sourceLocationName = value;
                OnSourceLocationNameChanged();
            }
        }
        partial void OnSourceLocationNameChanging();
        partial void OnSourceLocationNameChanged();

        [DataMember]
        public virtual string SourceUnit
        {
            get { return _sourceUnit.TrimEnd(); }
            set
            {
                OnSourceUnitChanging();
                _sourceUnit = value;
                OnSourceUnitChanged();
            }
        }
        partial void OnSourceUnitChanging();
        partial void OnSourceUnitChanged();

        [DataMember]
        public virtual int PlanPkgGoodsQty
        {
            get { return _planPkgGoodsQty; }
            set
            {
                OnPlanPkgGoodsQtyChanging();
                _planPkgGoodsQty = value;
                OnPlanPkgGoodsQtyChanged();
            }
        }
        partial void OnPlanPkgGoodsQtyChanging();
        partial void OnPlanPkgGoodsQtyChanged();

        [DataMember]
        public virtual int PlanPieceGoodsQty
        {
            get { return _planPieceGoodsQty; }
            set
            {
                OnPlanPieceGoodsQtyChanging();
                _planPieceGoodsQty = value;
                OnPlanPieceGoodsQtyChanged();
            }
        }
        partial void OnPlanPieceGoodsQtyChanging();
        partial void OnPlanPieceGoodsQtyChanged();

        [DataMember]
        public virtual string TargetAreaCode
        {
            get { return _targetAreaCode.TrimEnd(); }
            set
            {
                OnTargetAreaCodeChanging();
                _targetAreaCode = value;
                OnTargetAreaCodeChanged();
            }
        }
        partial void OnTargetAreaCodeChanging();
        partial void OnTargetAreaCodeChanged();

        [DataMember]
        public virtual string TargetAreaName
        {
            get { return _targetAreaName.TrimEnd(); }
            set
            {
                OnTargetAreaNameChanging();
                _targetAreaName = value;
                OnTargetAreaNameChanged();
            }
        }
        partial void OnTargetAreaNameChanging();
        partial void OnTargetAreaNameChanged();

        [DataMember]
        public virtual string TargetShelfCode
        {
            get { return _targetShelfCode.TrimEnd();}
            set { _targetShelfCode = value; }
        }

        [DataMember]
        public virtual string TargetShelfName
        {
            get { return _targetShelfName.TrimEnd(); }
            set { _targetShelfName = value; }
        }

        [DataMember]
        public virtual string TargetLocationCode
        {
            get { return _targetLocationCode.TrimEnd(); }
            set
            {
                OnTargetLocationCodeChanging();
                _targetLocationCode = value;
                OnTargetLocationCodeChanged();
            }
        }
        partial void OnTargetLocationCodeChanging();
        partial void OnTargetLocationCodeChanged();

        [DataMember]
        public virtual string TargetLocationName
        {
            get { return _targetLocationName.TrimEnd(); }
            set
            {
                OnTargetLocationNameChanging();
                _targetLocationName = value;
                OnTargetLocationNameChanged();
            }
        }
        partial void OnTargetLocationNameChanging();
        partial void OnTargetLocationNameChanged();

        [DataMember]
        public virtual string TargetUnit
        {
            get { return _targetUnit.TrimEnd(); }
            set
            {
                OnTargetUnitChanging();
                _targetUnit = value;
                OnTargetUnitChanged();
            }
        }
        partial void OnTargetUnitChanging();
        partial void OnTargetUnitChanged();

        [DataMember]
        public virtual int PkgGoodsQty
        {
            get { return _pkgGoodsQty; }
            set
            {
                OnPkgGoodsQtyChanging();
                _pkgGoodsQty = value;
                OnPkgGoodsQtyChanged();
            }
        }
        partial void OnPkgGoodsQtyChanging();
        partial void OnPkgGoodsQtyChanged();


        [DataMember]
        public virtual int PieceGoodsQty
        {
            get { return _pieceGoodsQty; }
            set
            {
                OnPieceGoodsQtyChanging();
                _pieceGoodsQty = value;
                OnPieceGoodsQtyChanged();
            }
        }
        partial void OnPieceGoodsQtyChanging();
        partial void OnPieceGoodsQtyChanged();

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        [DataMember]
        public virtual string EditFlag
        {
            get { return _EditFlag.TrimEnd(); }
            set { _EditFlag = value; }
        }
        #endregion
    }
}